/**
 * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
 * SPDX-license-identifier: BSD-3-Clause
 */

import { useSelector } from 'react-redux';
import { memo, useState } from 'react';
import { Drawer } from '@arco-design/web-react';
import { useDeviceState, useLeave } from '@/lib/useCommon';
import { RootState } from '@/store';
import { isVisionMode } from '@/config/common';
import { ScreenShareScene } from '@/config';
import utils from '@/utils/utils';
import Menu from '../../Menu';

import style from './index.module.less';
import CameraOpenSVG from '@/assets/img/CameraOpen.svg';
import CameraCloseSVG from '@/assets/img/CameraClose.svg';
import MicOpenSVG from '@/assets/img/MicOpen.svg';
import SettingSVG from '@/assets/img/Setting.svg';
import MicCloseSVG from '@/assets/AiImgs/disable-mircphone.png';
import LeaveRoomSVG from '@/assets/img/LeaveRoom.svg';
import ScreenOnSVG from '@/assets/img/ScreenOn.svg';
import ScreenOffSVG from '@/assets/img/ScreenOff.svg';
import Micopen from '@/assets/AiImgs/micphone.png'
function ToolBar(props: React.HTMLAttributes<HTMLDivElement>) {
  const { className, ...rest } = props;
  const room = useSelector((state: RootState) => state.room);
  const [open, setOpen] = useState(false);
  const model = room.aiConfig.Config.LLMConfig?.ModelName;
  const isScreenMode = ScreenShareScene.includes(room.scene);
  const leaveRoom = useLeave();
  const {
    isAudioPublished,
    isVideoPublished,
    isScreenPublished,
    switchMic,
    switchCamera,
    switchScreenCapture,
  } = useDeviceState();

  const handleSetting = () => {
    setOpen(true);
  };
  return (
    <div>
      {MicOpenSVG?<img
            src={Micopen}
            onClick={() => switchMic(true)}
            className={`${style.btn} h-[60px]`}
            alt="mic"
        />:<img
        src={MicCloseSVG}
        onClick={() => switchMic(true)}
        className={`${style.btn} h-[60px]`}
        alt="mic"
    />}
        
    </div>
    
  );
}
export default memo(ToolBar);
